package com.yekaile.carsystem.service;


import com.yekaile.carsystem.controller.vo.MenuVO2;
import com.yekaile.carsystem.entity.Role;
import com.yekaile.carsystem.entity.SystemAuthority;
import com.yekaile.carsystem.entity.UserRole;

import java.util.List;
import java.util.Set;

/**
 * @author yekaile
 */
public interface AuthorityService {

    int distributeRoleAuthority(Integer roleId, List<Integer> systemAuthortyIdList);


    int distributeOnlyUserAuthority(Integer userId, List<Integer> systemAuthortyIdList);

    int addRole(Integer userId, Integer roleId);

    int deleteRole(Integer userId, Integer roleId);


    int updateRole(UserRole userRole, Integer roleId);

    List<Role> getRoles(Integer userId);


    int addAuthority(SystemAuthority authority);

    List<SystemAuthority> getAllAuthorities();

    Integer deleteAuthority(Integer authorityId);

    Set<MenuVO2> getDistinctMenus();
}
